/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.Solver;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Info
 */
@JsonPropertyOrder({
  Info.JSON_PROPERTY_NIGHT_SKY_API_VERSION,
  Info.JSON_PROPERTY_SIRIUS_VERSION,
  Info.JSON_PROPERTY_LATEST_SIRIUS_VERSION,
  Info.JSON_PROPERTY_LATEST_SIRIUS_LINK,
  Info.JSON_PROPERTY_UPDATE_AVAILABLE,
  Info.JSON_PROPERTY_SIRIUS_LIB_VERSION,
  Info.JSON_PROPERTY_FINGER_ID_LIB_VERSION,
  Info.JSON_PROPERTY_CHEM_DB_VERSION,
  Info.JSON_PROPERTY_FINGER_ID_MODEL_VERSION,
  Info.JSON_PROPERTY_FINGERPRINT_ID,
  Info.JSON_PROPERTY_AVAILABLE_I_L_P_SOLVERS,
  Info.JSON_PROPERTY_SUPPORTED_I_L_P_SOLVERS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class Info {
  public static final String JSON_PROPERTY_NIGHT_SKY_API_VERSION = "nightSkyApiVersion";
  @jakarta.annotation.Nullable
  private String nightSkyApiVersion;

  public static final String JSON_PROPERTY_SIRIUS_VERSION = "siriusVersion";
  @jakarta.annotation.Nullable
  private String siriusVersion;

  public static final String JSON_PROPERTY_LATEST_SIRIUS_VERSION = "latestSiriusVersion";
  @jakarta.annotation.Nullable
  private String latestSiriusVersion;

  public static final String JSON_PROPERTY_LATEST_SIRIUS_LINK = "latestSiriusLink";
  @jakarta.annotation.Nullable
  private String latestSiriusLink;

  public static final String JSON_PROPERTY_UPDATE_AVAILABLE = "updateAvailable";
  @jakarta.annotation.Nullable
  private Boolean updateAvailable;

  public static final String JSON_PROPERTY_SIRIUS_LIB_VERSION = "siriusLibVersion";
  @jakarta.annotation.Nullable
  private String siriusLibVersion;

  public static final String JSON_PROPERTY_FINGER_ID_LIB_VERSION = "fingerIdLibVersion";
  @jakarta.annotation.Nullable
  private String fingerIdLibVersion;

  public static final String JSON_PROPERTY_CHEM_DB_VERSION = "chemDbVersion";
  @jakarta.annotation.Nullable
  private String chemDbVersion;

  public static final String JSON_PROPERTY_FINGER_ID_MODEL_VERSION = "fingerIdModelVersion";
  @jakarta.annotation.Nullable
  private String fingerIdModelVersion;

  public static final String JSON_PROPERTY_FINGERPRINT_ID = "fingerprintId";
  @jakarta.annotation.Nullable
  private String fingerprintId;

  public static final String JSON_PROPERTY_AVAILABLE_I_L_P_SOLVERS = "availableILPSolvers";
  @jakarta.annotation.Nonnull
  private List<Solver> availableILPSolvers = new ArrayList<>();

  public static final String JSON_PROPERTY_SUPPORTED_I_L_P_SOLVERS = "supportedILPSolvers";
  @jakarta.annotation.Nonnull
  private Map<String, String> supportedILPSolvers = new HashMap<>();

  public Info() {
  }

  public Info nightSkyApiVersion(@jakarta.annotation.Nullable String nightSkyApiVersion) {
    
    this.nightSkyApiVersion = nightSkyApiVersion;
    return this;
  }

  /**
   * API version of the SIRIUS Nightsky API
   * @return nightSkyApiVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NIGHT_SKY_API_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getNightSkyApiVersion() {
    return nightSkyApiVersion;
  }


  @JsonProperty(JSON_PROPERTY_NIGHT_SKY_API_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNightSkyApiVersion(@jakarta.annotation.Nullable String nightSkyApiVersion) {
    this.nightSkyApiVersion = nightSkyApiVersion;
  }

  public Info siriusVersion(@jakarta.annotation.Nullable String siriusVersion) {
    
    this.siriusVersion = siriusVersion;
    return this;
  }

  /**
   * Version of the SIRIUS application
   * @return siriusVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SIRIUS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSiriusVersion() {
    return siriusVersion;
  }


  @JsonProperty(JSON_PROPERTY_SIRIUS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSiriusVersion(@jakarta.annotation.Nullable String siriusVersion) {
    this.siriusVersion = siriusVersion;
  }

  public Info latestSiriusVersion(@jakarta.annotation.Nullable String latestSiriusVersion) {
    
    this.latestSiriusVersion = latestSiriusVersion;
    return this;
  }

  /**
   * Latest available Version of the SIRIUS application
   * @return latestSiriusVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LATEST_SIRIUS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getLatestSiriusVersion() {
    return latestSiriusVersion;
  }


  @JsonProperty(JSON_PROPERTY_LATEST_SIRIUS_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLatestSiriusVersion(@jakarta.annotation.Nullable String latestSiriusVersion) {
    this.latestSiriusVersion = latestSiriusVersion;
  }

  public Info latestSiriusLink(@jakarta.annotation.Nullable String latestSiriusLink) {
    
    this.latestSiriusLink = latestSiriusLink;
    return this;
  }

  /**
   * Link to the latest available Version of the SIRIUS application
   * @return latestSiriusLink
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LATEST_SIRIUS_LINK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getLatestSiriusLink() {
    return latestSiriusLink;
  }


  @JsonProperty(JSON_PROPERTY_LATEST_SIRIUS_LINK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLatestSiriusLink(@jakarta.annotation.Nullable String latestSiriusLink) {
    this.latestSiriusLink = latestSiriusLink;
  }

  public Info updateAvailable(@jakarta.annotation.Nullable Boolean updateAvailable) {
    
    this.updateAvailable = updateAvailable;
    return this;
  }

  /**
   * true if newer SIRIUS version is available
   * @return updateAvailable
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_UPDATE_AVAILABLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isUpdateAvailable() {
    return updateAvailable;
  }


  @JsonProperty(JSON_PROPERTY_UPDATE_AVAILABLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUpdateAvailable(@jakarta.annotation.Nullable Boolean updateAvailable) {
    this.updateAvailable = updateAvailable;
  }

  public Info siriusLibVersion(@jakarta.annotation.Nullable String siriusLibVersion) {
    
    this.siriusLibVersion = siriusLibVersion;
    return this;
  }

  /**
   * Version of the SIRIUS libraries
   * @return siriusLibVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SIRIUS_LIB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSiriusLibVersion() {
    return siriusLibVersion;
  }


  @JsonProperty(JSON_PROPERTY_SIRIUS_LIB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSiriusLibVersion(@jakarta.annotation.Nullable String siriusLibVersion) {
    this.siriusLibVersion = siriusLibVersion;
  }

  public Info fingerIdLibVersion(@jakarta.annotation.Nullable String fingerIdLibVersion) {
    
    this.fingerIdLibVersion = fingerIdLibVersion;
    return this;
  }

  /**
   * Version of the CSI:FingerID libraries
   * @return fingerIdLibVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FINGER_ID_LIB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getFingerIdLibVersion() {
    return fingerIdLibVersion;
  }


  @JsonProperty(JSON_PROPERTY_FINGER_ID_LIB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFingerIdLibVersion(@jakarta.annotation.Nullable String fingerIdLibVersion) {
    this.fingerIdLibVersion = fingerIdLibVersion;
  }

  public Info chemDbVersion(@jakarta.annotation.Nullable String chemDbVersion) {
    
    this.chemDbVersion = chemDbVersion;
    return this;
  }

  /**
   * Version of the Chemical Database available via SIRIUS web services
   * @return chemDbVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CHEM_DB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getChemDbVersion() {
    return chemDbVersion;
  }


  @JsonProperty(JSON_PROPERTY_CHEM_DB_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setChemDbVersion(@jakarta.annotation.Nullable String chemDbVersion) {
    this.chemDbVersion = chemDbVersion;
  }

  public Info fingerIdModelVersion(@jakarta.annotation.Nullable String fingerIdModelVersion) {
    
    this.fingerIdModelVersion = fingerIdModelVersion;
    return this;
  }

  /**
   * Version of the Machine learning models used for Fingerprint, Compound Class and Structure Prediction  Not available if web service is not reachable.
   * @return fingerIdModelVersion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FINGER_ID_MODEL_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getFingerIdModelVersion() {
    return fingerIdModelVersion;
  }


  @JsonProperty(JSON_PROPERTY_FINGER_ID_MODEL_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFingerIdModelVersion(@jakarta.annotation.Nullable String fingerIdModelVersion) {
    this.fingerIdModelVersion = fingerIdModelVersion;
  }

  public Info fingerprintId(@jakarta.annotation.Nullable String fingerprintId) {
    
    this.fingerprintId = fingerprintId;
    return this;
  }

  /**
   * Version of the Molecular Fingerprint used by SIRIUS
   * @return fingerprintId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FINGERPRINT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getFingerprintId() {
    return fingerprintId;
  }


  @JsonProperty(JSON_PROPERTY_FINGERPRINT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFingerprintId(@jakarta.annotation.Nullable String fingerprintId) {
    this.fingerprintId = fingerprintId;
  }

  public Info availableILPSolvers(@jakarta.annotation.Nonnull List<Solver> availableILPSolvers) {
    
    this.availableILPSolvers = availableILPSolvers;
    return this;
  }

  public Info addAvailableILPSolversItem(Solver availableILPSolversItem) {
    if (this.availableILPSolvers == null) {
      this.availableILPSolvers = new ArrayList<>();
    }
    this.availableILPSolvers.add(availableILPSolversItem);
    return this;
  }

  /**
   * Set of solvers that are configured correctly and can be loaded
   * @return availableILPSolvers
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_AVAILABLE_I_L_P_SOLVERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<Solver> getAvailableILPSolvers() {
    return availableILPSolvers;
  }


  @JsonProperty(JSON_PROPERTY_AVAILABLE_I_L_P_SOLVERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAvailableILPSolvers(@jakarta.annotation.Nonnull List<Solver> availableILPSolvers) {
    this.availableILPSolvers = availableILPSolvers;
  }

  public Info supportedILPSolvers(@jakarta.annotation.Nonnull Map<String, String> supportedILPSolvers) {
    
    this.supportedILPSolvers = supportedILPSolvers;
    return this;
  }

  public Info putSupportedILPSolversItem(String key, String supportedILPSolversItem) {
    this.supportedILPSolvers.put(key, supportedILPSolversItem);
    return this;
  }

  /**
   * Set of ILP Solvers that are Supported and their version information
   * @return supportedILPSolvers
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_SUPPORTED_I_L_P_SOLVERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Map<String, String> getSupportedILPSolvers() {
    return supportedILPSolvers;
  }


  @JsonProperty(JSON_PROPERTY_SUPPORTED_I_L_P_SOLVERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSupportedILPSolvers(@jakarta.annotation.Nonnull Map<String, String> supportedILPSolvers) {
    this.supportedILPSolvers = supportedILPSolvers;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Info info = (Info) o;
    return Objects.equals(this.nightSkyApiVersion, info.nightSkyApiVersion) &&
        Objects.equals(this.siriusVersion, info.siriusVersion) &&
        Objects.equals(this.latestSiriusVersion, info.latestSiriusVersion) &&
        Objects.equals(this.latestSiriusLink, info.latestSiriusLink) &&
        Objects.equals(this.updateAvailable, info.updateAvailable) &&
        Objects.equals(this.siriusLibVersion, info.siriusLibVersion) &&
        Objects.equals(this.fingerIdLibVersion, info.fingerIdLibVersion) &&
        Objects.equals(this.chemDbVersion, info.chemDbVersion) &&
        Objects.equals(this.fingerIdModelVersion, info.fingerIdModelVersion) &&
        Objects.equals(this.fingerprintId, info.fingerprintId) &&
        Objects.equals(this.availableILPSolvers, info.availableILPSolvers) &&
        Objects.equals(this.supportedILPSolvers, info.supportedILPSolvers);
  }

  @Override
  public int hashCode() {
    return Objects.hash(nightSkyApiVersion, siriusVersion, latestSiriusVersion, latestSiriusLink, updateAvailable, siriusLibVersion, fingerIdLibVersion, chemDbVersion, fingerIdModelVersion, fingerprintId, availableILPSolvers, supportedILPSolvers);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Info {\n");
    sb.append("    nightSkyApiVersion: ").append(toIndentedString(nightSkyApiVersion)).append("\n");
    sb.append("    siriusVersion: ").append(toIndentedString(siriusVersion)).append("\n");
    sb.append("    latestSiriusVersion: ").append(toIndentedString(latestSiriusVersion)).append("\n");
    sb.append("    latestSiriusLink: ").append(toIndentedString(latestSiriusLink)).append("\n");
    sb.append("    updateAvailable: ").append(toIndentedString(updateAvailable)).append("\n");
    sb.append("    siriusLibVersion: ").append(toIndentedString(siriusLibVersion)).append("\n");
    sb.append("    fingerIdLibVersion: ").append(toIndentedString(fingerIdLibVersion)).append("\n");
    sb.append("    chemDbVersion: ").append(toIndentedString(chemDbVersion)).append("\n");
    sb.append("    fingerIdModelVersion: ").append(toIndentedString(fingerIdModelVersion)).append("\n");
    sb.append("    fingerprintId: ").append(toIndentedString(fingerprintId)).append("\n");
    sb.append("    availableILPSolvers: ").append(toIndentedString(availableILPSolvers)).append("\n");
    sb.append("    supportedILPSolvers: ").append(toIndentedString(supportedILPSolvers)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

